// Copyright (c) Appeon. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

namespace SnapObjects.Data
{
    /// <summary>
    ///     Defines the optional strategies for the property to save data to the database.
    /// </summary>
    public enum SaveStrategy
    {
        /// <summary>
        ///     (Default) Saves data to the database when data is inserted or updated.
        /// </summary>
        Save,

        /// <summary>
        ///     Saves data to the database only when data is inserted.
        /// </summary>
        SaveOnCreate,

        /// <summary>
        ///     Saves data to the database only when data is updated.
        /// </summary>
        SaveOnUpdate,

        /// <summary>
        ///     Does not save data, but only reads data from the database.
        /// </summary>
        ReadAfterSave,

        /// <summary>
        ///     Not to save data to the database.
        /// </summary>
        Ignore
    }
}
